package terrain.impl.first;
import java.awt.Graphics;

import java.awt.image.BufferedImage;


public class Point {

	private int x;
	private int y;
	private boolean isFree;
	
	public Point(){
		x=0;
		y=0;
		isFree=true;
	}

	public Point(int x, int y) {
		this.x=x;
		this.y=y;
		isFree=true;
	}

	public int getX() {
		return x;
	}

	public void setX(int x) {
		this.x = x;
	}

	public int getY() {
		return y;
	}

	public void setY(int y) {
		this.y = y;
	}

	public boolean isFree() {
		return isFree;
	}

	public void setFree(boolean isFree) {
		this.isFree = isFree;
	}

	public void paint(int x2, int y2, Graphics g) {
		
		g.drawLine(x+x2, y+y2, x+x2, y+y2);
		
	}

	public void calculateIntersection(BufferedImage image, int freeColor,int x1,int y1) {
		if(image.getRGB(x+x1, y+y1)!=freeColor){
			isFree=false;
		}
		
		
	}
	
	
}
